package org_rosjava.ros.android.android_tutorial_map_viewer;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;


import net.xxhong.rosclient.R;

import java.util.HashMap;


public class MainActivity extends Activity {

    public static MainActivity mapActivity;
    private String location;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mapActivity = this;
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

        getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
        //((Activity) mycontext).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);


        setContentView(R.layout.myactivity_main);


    }


    @Override
    protected void onResume () {
        super.onResume();
        Intent intent = new Intent(this, My_map.class);
        startActivityForResult(intent,123);
    }


    @Override
    protected void onDestroy() {
        finishActivity(123);
        super.onDestroy();
    }

    public static MainActivity getInstance() {
        return mapActivity;
    }
}
